/**
 * 
 */
package org.paybiz.core.payplatform.bill99.constant;

import org.paybiz.util.ClassLoaderUtil;
import org.paybiz.util.DynamicConfig;


/**
 * 快钱支付常量
 * @author nassir wen
 * @data 2012-5-15 下午01:59:14
 * @version V2.5
 * @Copyright Copyright (c) 2012
 */
public class Bill99Constant {
    /** 商户号 */
    public static final String BILL99_MERID = "bill99_MerId";

    /** 快钱支付地址 */
    public static final String BILL99_PAYURL = "bill99_payUrl";

    /** 快钱回调地址 */
    public static final String BILL99_RETURNURL = "bill99_returnUrl";

    /** 快钱异步回调链接 */
    public static final String BILL99_NOTIFYURL = "bill99_notifyUrl";

    /** 快钱语音支付链接 */
    public static final String BILL99_IVR_RETURNURL = "bill99_ivr_returnUrl";
    
    
    /**ivr 支付cer证书路径 公用密钥 */
    public static String IVR_CER_PATH = "";
    /**ivr 支付 jks证书路径 */
    public static String IVR_JKS_PATH = "";
    /**快钱人民币支付cer证书路径 */
    public static String BILL99_CER_PATH = "";
    /**快钱人民币支付rsa证书路径 */
    public static String BILL99_PFX_PATH = "";
    /**证书密码 */
    public static String BILL99_PASSWD = "bill99_passwd";
    /** 终端编号由快钱提供 */
    public static String TERMINALID = "";
    /**语音支付商户号*/
    public static String BILL99_IVR_MERID = "bill99_ivr_merid";

    /**语音支付属性文件对应 mgw.properties*/
    public static String IVR_PROP_PATH = "";

    /**人民币支付cer证书名称*/
    String BILL99_CER_NAME = "bill99_cer_name";
    /**人民币支付pfx证书名称*/
    public static String BILL99_PFX_NAME = "bill99_pfx_name";
    /**终端ID*/
    public static String BILL99_IVR_TERMINALID = "bill99_ivr_terminalId";
    /**语音支付公用密钥*/
    public static String BILL99_IVR_CER_NAME = "bill99_ivr_cer_name";
    /**语音支付jks私有密钥*/
    public static String BILL99_IVR_JKS_NAME = "bill99_ivr_jks_name";
    /**语音支付配置参数*/
    public static String IVR_PROP_NAME = "ivr_prop_name";

    static {
        IVR_CER_PATH = ClassLoaderUtil.getResource(DynamicConfig.getInstance().getValue(BILL99_IVR_CER_NAME)).getPath();
        IVR_PROP_PATH = ClassLoaderUtil.getResource(DynamicConfig.getInstance().getValue(IVR_PROP_NAME)).getPath();
        BILL99_IVR_MERID = DynamicConfig.getInstance().getValue(BILL99_IVR_MERID);
        TERMINALID = DynamicConfig.getInstance().getValue(BILL99_IVR_TERMINALID);
        IVR_JKS_PATH = ClassLoaderUtil.getResource(DynamicConfig.getInstance().getValue(BILL99_IVR_JKS_NAME)).getPath();
        BILL99_CER_PATH = ClassLoaderUtil.getResource(DynamicConfig.getInstance().getValue(BILL99_IVR_CER_NAME))
                .getPath();
        BILL99_PFX_PATH = ClassLoaderUtil.getResource(DynamicConfig.getInstance().getValue(BILL99_PFX_NAME)).getPath();
        BILL99_PASSWD = DynamicConfig.getInstance().getValue(BILL99_PASSWD);
    }
    
    /** 购买 */
    public static final String IVR_PURCHASE = "/cnp/purchase";

    /** 查询 */
    public static final String IVR_QUERY = "/cnp/query_txn";

    /** 退款 */
    public static final String IVR_REFUND = "/cnp/refund";

    /** 语音提交成功编码*/
    public static final String IVR_SUC = "00";
    
    /** 语音支付正在处理中*/
    public static final String IVR_PROCESS = "C0";
    
}
